<?php $this->load->view($config['site_template'].'/head');?>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    
                    <?php foreach($catalog as $value):?>
                    
                    <li>
                        <a href="#">
                            <i class="fa fa-home"></i>
                            <span class="nav-label"><?=$value['name']?></span>
                            <span class="fa arrow"></span>
                        </a>
                        <ul class="nav nav-second-level">
                            <?php foreach ($value['parentcatalog'] as $v):?>
                            <li>
                                <a class="J_menuItem" href="article/articleList?id=<?=$v['id']?>" data-index="0"><?=$v['name']?></a>
                            </li>
                            <?php endforeach;?>
                        </ul>
                    </li>
                    <?php endforeach;?>
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                        <form role="search" class="navbar-form-custom" method="post" action="javascript:void(0)">
                            <div class="form-group">
                                <input type="text" placeholder="请输入您需要查找的内容后按回车进行查询 …" class="form-control" name="top-search" id="top-search">
                            </div>
                            
                        </form>
                    </div>
                    
                    <ul class="nav navbar-top-links navbar-right">
                        
                        <li class="dropdown hidden-xs">
                            <a class="right-sidebar-toggle" aria-expanded="false" href="<?=  base_url('/qas/login')?>">
                                <i class="fa fa-tasks"></i> 登录后台
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content">
                        <a href="javascript:;" class="active J_menuTab" data-id="index">首页</a>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
                </button>
            </div>
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="<?=  base_url().'article/articleAll'?>" frameborder="0" data-id="index" seamless></iframe>
            </div>
            <div class="footer">
            </div>
        </div>
        <!--右侧部分结束-->
        
    </div>
</body>
<script>
    $(document).ready(function(){
        $("form").submit(function(e){
            var searchkey = $("#top-search").val();
            var src = "<?=  base_url().'article/articleAll?searchKey='?>"+searchkey;
            $(".J_iframe").attr("src",src);
            $(".J_menuTab").removeClass('active');
            $("a.J_menuTab[data-id=index]").addClass('active');
        })
    })
</script>
<?php $this->load->view($config['site_template'].'/foot');?>


